package org.restoran.model;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Simple POJO object for entity of menu category.
 *
 * @author Snisar Bogdan.
 */
@Entity
@Table(name = "CATEGORY")
//@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Category extends NameEntity {
    public Category() {
    }

    public Category(Integer id) {
        super(id);
    }

    public Category(String name) {
        super(name);
    }

    public Category(Integer id, String name) {
        super(id, name);
    }

    @Override
    public String toString() {
        return "Category{ name=" + getName()+" id="+getId()+"}";
    }


}
